<template>
    <div class="myBuy">
        <ul>
            <li class="icon-box">
                <van-icon class="icon" name="service-o" />
            </li>
            <li class="icon-box">
                <van-icon class="icon" name="shopping-cart-o" />
            </li>
            <li class="icon-box">
                <van-icon class="icon" name="star-o" />
            </li>
            <li class="btn-box">
                立即购买
            </li>
            <li @click="showDetail" class="btn-box add-cart">
                加入购物车
            </li>
        </ul>
    </div>
</template>

<script>
export default {
    name: '',
    data() { 
        return {

        }
    },
    created() {

    },
    methods:{
        showDetail() {
            // console.log(this);
            this.$emit('changeshow', true)
        }
    },
}
</script>

<style scoped lang="scss">
.myBuy {
    width: 100%;
    height: 100px;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 10;
    background-color: #fff;
    font-size: 30px;
    border-top: 1px solid #cdcdcd;
    ul {
        display: flex;
        align-items: center;
        .icon {
            font-size: 50px;
            margin-top: 20px;
        }
        .icon-box {
            width: 100px;
            text-align: center;
            line-height: 100px;
            border-right: 1px solid #cdcdcd;
            flex-shrink: 0;
        }
        .btn-box {
            width: calc((100% - 300px)/2);
            text-align: center;
        }
        .add-cart {
            background-color: #b7282e;
            color: #fff;
            line-height: 100px;
            font-weight: bold;
        }
    }
}
</style>